﻿package mortal.game.net.command.lottery
{
    import Framework.MQ.*;
    import Message.Command.*;
    import Message.Public.*;
    import mortal.game.cache.*;
    import mortal.game.mvc.*;
    import mortal.game.net.broadCast.*;
    import mortal.mvc.core.*;

    public class LotteryCommand extends BroadCastCall
    {

        public function LotteryCommand(param1:Object)
        {
            super(param1);
            return;
        }// end function

        override public function call(param1:MessageBlock) : void
        {
            var _loc_2:SSeqLotteryHistory = null;
            var _loc_3:SLotteryHistory = null;
            switch(param1.messageHead.command)
            {
                case EPublicCommand._ECmdPublicLotteryHistorys:
                {
                    _loc_2 = param1.messageBase as SSeqLotteryHistory;
                    Cache.instance.lottery.syncRecordList(_loc_2.historys);
                    NetDispatcher.dispatchCmd(ServerCommand.Lottery_Record_Update, null);
                    break;
                }
                case EPublicCommand._ECmdPublicLotteryHistoryAdd:
                {
                    _loc_3 = param1.messageBase as SLotteryHistory;
                    Cache.instance.lottery.addRecord(_loc_3);
                    NetDispatcher.dispatchCmd(ServerCommand.Lottery_Record_Update, null);
                    break;
                }
                default:
                {
                    break;
                }
            }
            return;
        }// end function

    }
}
